package com.hc.model.code04.test7_1;

/**
 * @version v1.0
 * @ClassName: User
 * @Description: 抽象的同事类
 * @Author: HC
 */
public abstract class User {
    // 同事性名
    protected String name;

    // 中介者对象
    protected ChatMediator mediator;

    public User(String name, ChatMediator mediator) {
        this.name = name;
        this.mediator = mediator;
    }

    // 发送消息
    public abstract void sendMessage(String message);

    // 接收消息
    public abstract void receiveMessage(String message);
}
